/*
 * Action.java  0.4.0 / Oct 25, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.swing;

import java.beans.PropertyChangeListener;

import com.cute4j.swing.events.ActionListener;

/**
 * Action Interface.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public interface Action extends ActionListener {

// Public Static Fields. -------------------------------------------------------

  /**
   * Default property.
   */
  public static final String DEFAULT = "Default";

  /**
   * Name property.
   */
  public static final String NAME = "Name";

  /**
   * Short description property.
   */
  public static final String SHORT_DESCRIPTION = "ShortDescription";

  /**
   * Long description property.
   */
  public static final String LONG_DESCRIPTION = "LongDescription";

  /**
   * Help description property.
   */
  public static final String HELP_DESCRIPTION = "HelpDescription";

  /**
   * Small icon property.
   */
  public static final String SMALL_ICON = "SmallIcon";

  /**
   * Small icon name property.
   */
  public static final String SMALL_ICON_NAME = "SmallIconName";

  /**
   * Action command key property.
   */
  public static final String ACTION_COMMAND_KEY = "ActionCommandKey";

  /**
   * Accelerator key property.
   */
  public static final String ACCELERATOR_KEY = "AcceleratorKey";

  /**
   * Accelerator key property.
   */
  public static final String ACCELERATOR_KEY_NAME = "AcceleratorKeyName";

  /**
   * Mnemonic key property.
   */
  public static final String MNEMONIC_KEY = "MnemonicKey";

// Public Methods. -------------------------------------------------------------

  /**
   * Returns the value of the property specified by the key.
   *
   * @param key the property key
   *
   * @return the value of this property or <tt>null</tt> if there is no such
   *         property
   */
  public Object getValue(String key);

  /**
   * Sets the value of the property specified by the key.
   *
   * @param key the property key
   * @param value the new property value
   */
  public void putValue(String key, Object value);

  /**
   * Returns enabled state of the action.
   *
   * @return enabled state of the action
   */
  public boolean isEnabled();

  /**
   * Sets enabled state of the action.
   *
   * @param b the new enabled state
   */
  public void setEnabled(boolean b);

  /**
   * Returns selected state of the action.
   *
   * @return selected state of the action
   */
  public boolean isSelected();

  /**
   * Sets selected state of the action.
   *
   * @param b the new selected state
   */
  public void setSelected(boolean b);

  /**
   * Adds property change listener.
   *
   * @param listener the property change listener
   */
  public void addPropertyChangeListener(PropertyChangeListener listener);

  /**
   * Removes property change listener.
   *
   * @param listener the property change listener
   */
  public void removePropertyChangeListener(PropertyChangeListener listener);

}
